﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace shenghua.Migrations
{
    public partial class addentity40 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DeleterUserId",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "DeletionTime",
                table: "Articles");

            migrationBuilder.RenameColumn(
                name: "Synopsis",
                table: "Articles",
                newName: "Source");

            migrationBuilder.RenameColumn(
                name: "IsDeleted",
                table: "Articles",
                newName: "Enabled");

            migrationBuilder.RenameColumn(
                name: "Cover",
                table: "Articles",
                newName: "Picture");

            migrationBuilder.AddColumn<string>(
                name: "Author",
                table: "Articles",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ClickCount",
                table: "Articles",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "CommentCount",
                table: "Articles",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "Description",
                table: "Articles",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "Status",
                table: "Articles",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "Pictures_StringValue",
                table: "Articles",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Tags_StringValue",
                table: "Articles",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Author",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "ClickCount",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "CommentCount",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "Description",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "Status",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "Pictures_StringValue",
                table: "Articles");

            migrationBuilder.DropColumn(
                name: "Tags_StringValue",
                table: "Articles");

            migrationBuilder.RenameColumn(
                name: "Source",
                table: "Articles",
                newName: "Synopsis");

            migrationBuilder.RenameColumn(
                name: "Picture",
                table: "Articles",
                newName: "Cover");

            migrationBuilder.RenameColumn(
                name: "Enabled",
                table: "Articles",
                newName: "IsDeleted");

            migrationBuilder.AddColumn<long>(
                name: "DeleterUserId",
                table: "Articles",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DeletionTime",
                table: "Articles",
                nullable: true);
        }
    }
}
